import request from '@/utils/request';

export function getConfigureGroup(data) {
    return request({
        url: '/configgroup',
        method: 'get',
        params: data
    })
}

export function createConfigureGroup(data) {
    return request({
        url: '/configgroup',
        method: 'post',
        data
    })
}

export function updateConfigureGroup(data) {
    return request({
        url: '/configgroup',
        method: 'put',
        data
    })
}

export function deleteConfigureGroup(data) {
    return request({
        url: '/configgroup',
        method: 'delete',
        data
    })
}

export function getConfigureList(data) {
    return request({
        url: '/configgroup/configList',
        method: 'get',
        params: data
    })
}

export function getConfigures(data) {
    return request({
        url: '/configgroup/addconfigs',
        method: 'get',
        params: data
    })
}

export function addConfigure(data) {
    return request({
        url: '/configgroup/add',
        method: 'put',
        data
    })
}

export function getOneConfigureGroup(id) {
    return request({
        url: `/configgroup/${id}`,
        method: 'get',
    })
}

export function getIps(data) {
    return request({
        url: '/configgroup/ips',
        method: 'get',
        params: data
    })
}

export function getConfigure(data) {
    return request({
        url: "/configgroup/config",
        method: 'get',
        params: data
    })
}

export function deleteConfigure(data) {
    return request({
        url: '/configgroup/config',
        method: 'delete',
        data
    })
}

export function updateConfigure(data) {
    return request({
        url: '/configgroup/config',
        method: 'put',
        data
    })
}

export function issueByHost(data) {
    return request({
        url: '/configgroup/hosts',
        method: 'post',
        data
    })
}

export function issueByBatch(data) {
    return request({
        url: '/configgroup/hostsBatch',
        method: 'post',
        data
    })
}

export function issueByFile(data) {
    return request({
        url: '/configgroup/hostsFile',
        method: 'post',
        data
    })
}

export function getHosts(data) {
    return request({
        url: '/configgroup/hostsGet',
        method: 'get',
        params: data
    })
}

export function lockHosts(data) {
    return request({
        url: '/configgroup/lock',
        method: 'put',
        data
    })
}

export function getReport(data) {
    return request({
        url: '/configgroup/report',
        method: 'get',
        params: data
    })
}

export function issueGroupByHost(data) {
    return request({
        url: '/configgroup/issue',
        method: 'post',
        data
    })
}

export function issueGroupByBatch(data) {
    return request({
        url: '/configgroup/issue/batch',
        method: 'post',
        data
    })
}

export function importConfigureGroup(data) {
    return request({
        url: '/configgroup/filecreate',
        method: 'post',
        data
    })
}

export function downloadConfigureGroup(data) {
    return request({
        url: '/configgroup/download',
        method: 'post',
        responseType: 'blob',
        data
    })
}